package components;

import components.buttons.*;

import javax.swing.*;
import javax.swing.text.StyleConstants;
import javax.swing.text.StyledEditorKit;
import java.awt.*;

/**
 * Created by IntelliJ IDEA.
 * User: admin
 * Date: 26.01.2006
 * Time: 16:10:57
 * To change this template use File | Settings | File Templates.
 */
public class UpperButtonPanel extends JToolBar {
    private StyledEditorKit.AlignmentAction actionAlignLeft;
    AlignLeftButton alignLeftButton;
    AlignRightButton alignRightButton;
    AlignCenterButton alignCenterButton;
    AlignJustifiedButton alignJustifiedButton;
    InputButton inputButton;
    ButtonButton buttonButton;
    SaveExitButton saveExitButton;
    ExitButton exitButton;
    CopyButton copyButton;
    CutButton cutButton;
    PasteButton pasteButton;
    DeleteButton deleteButton;
    private StyledEditorKit.AlignmentAction actionAlignRight;
    private StyledEditorKit.AlignmentAction actionAlignCenter;
    private StyledEditorKit.AlignmentAction actionAlignJustified;
    CreateCardButton createCardButton;
    SaveButton saveButton;

    public UpperButtonPanel() {
        super();
        actionAlignLeft = new StyledEditorKit.AlignmentAction("", StyleConstants.ALIGN_LEFT);
        actionAlignLeft.setEnabled(true);
        alignLeftButton = new AlignLeftButton(actionAlignLeft);
        actionAlignRight = new StyledEditorKit.AlignmentAction("", StyleConstants.ALIGN_RIGHT);
        actionAlignRight.setEnabled(true);
        alignRightButton = new AlignRightButton(actionAlignRight);
        actionAlignCenter = new StyledEditorKit.AlignmentAction("", StyleConstants.ALIGN_CENTER);
        actionAlignCenter.setEnabled(true);
        alignCenterButton = new AlignCenterButton(actionAlignCenter);
        actionAlignJustified = new StyledEditorKit.AlignmentAction("", StyleConstants.ALIGN_JUSTIFIED);
        actionAlignJustified.setEnabled(true);
        alignJustifiedButton = new AlignJustifiedButton(actionAlignJustified);
        createCardButton = new CreateCardButton();
        saveButton = new SaveButton();
        saveExitButton = new SaveExitButton();
        exitButton = new ExitButton();
        buttonButton = new ButtonButton();
        inputButton = new InputButton();
        copyButton =  new CopyButton();
        cutButton = new CutButton();
        pasteButton = new PasteButton();
        deleteButton = new DeleteButton();


        add(createCardButton, BorderLayout.WEST);
        add(deleteButton, BorderLayout.WEST);
        add(new JToolBar.Separator());
        add(saveButton, BorderLayout.EAST);
        add(saveExitButton, BorderLayout.EAST);
        add(exitButton, BorderLayout.EAST);
        add(new JToolBar.Separator());
        add(copyButton, BorderLayout.EAST);
        add(cutButton, BorderLayout.EAST);
        add(pasteButton, BorderLayout.EAST);

        add(new JToolBar.Separator());
        add(alignLeftButton);
        add(alignRightButton);
        add(alignCenterButton);
        add(alignJustifiedButton);
        add(new JToolBar.Separator());
        add(inputButton);
        add(buttonButton);
        setFloatable(false);
    }

    public CreateCardButton getCreateCardButton() {
        return createCardButton;

    }

    public SaveButton getSaveButton() {

        return saveButton;
    }
    public SaveExitButton getSaveExitButton() {

            return saveExitButton;
    }
    public ExitButton getExitButton() {

                return exitButton;
    }



    public AlignLeftButton getAlignLeftButton() {
        return alignLeftButton;

    }

    public AlignRightButton getAlignRightButton() {

        return alignRightButton;
    }

    public AlignCenterButton getAlignCenterButton() {

        return alignCenterButton;
    }

    public AlignJustifiedButton getAlignJustifiedButton() {

        return alignJustifiedButton;
    }

    public InputButton getInputButton(){


        return inputButton;
    }

    public ButtonButton getButtonButton()
    {

        return buttonButton;
    }
    public CopyButton getCopyButton()
    {

        return copyButton;
    }
    public CutButton getCutButton()
    {

        return cutButton;
    }
    public PasteButton getPasteButton()
    {

        return pasteButton;
    }
    public DeleteButton getDeleteButton()
    {

        return deleteButton;
    }
}

